package com.jinke.api.modules.third.shippo.model.response;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.List;

/**
 * @projectName:
 * @title: ShippoAddressResponse
 * @description: create a address result
 * @see:
 * @author: hhp
 * @version: 1.0.0
 * @createTime: 2024/8/16 13:31
 */
@Data
@Accessors(chain = true)
public class ShippoAddressResponse {
    private String name;
    private String company;
    private String street1;
    private String street2;
    private String street3;
    @JSONField(name = "street_no")
    private String streetNo;
    private String city;
    private String state;
    private String zip;
    private String country;
    private String phone;
    private String email;
    @JSONField(name = "is_residential")
    private Boolean isResidential;
    private String metadata;
    @JSONField(name = "is_complete")
    private Boolean isComplete;
    private BigDecimal latitude;
    private BigDecimal longitude;
    //创建时间
    @JSONField(name = "object_created")
    private String objectCreated;
    @JSONField(name = "object_id")
    private String objectID;
    @JSONField(name = "object_owner")
    private String objectOwner;
    @JSONField(name = "object_updated")
    private String objectUpdated;
    @JSONField(name = "validation_results")
    private ValidationResults validationResults;
    private Boolean test;

    @Data
    public static class ValidationResults {
        @JSONField(name = "is_valid")
        private Boolean isValid;
        private List<Messages> messages;
    }
    @Data
    public static class Messages {
        private String code;
        private String source;
        private String text;
        private String type;
    }
}
